package cn.xiaopengstack.infrastructure.persistent.dao;

import cn.xiaopengstack.infrastructure.persistent.po.GroupBuyOrderRefund;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author jiangyangang
* @description 针对表【group_buy_order_refund(拼团订单退单详情)】的数据库操作Mapper
* @createDate 2025-11-07 16:00:30
* @Entity cn.xiaopengstack.infrastructure.persistent.po.GroupBuyOrderRefund
*/
@Mapper
public interface IGroupBuyOrderRefundDao {


    int insertSelective(GroupBuyOrderRefund record);

    GroupBuyOrderRefund selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(GroupBuyOrderRefund record);

    int updateByPrimaryKey(GroupBuyOrderRefund record);

    /**
     * 查询退款订单
     * @param orderId
     * @param userId
     * @return
     */
    GroupBuyOrderRefund queryRefundByOrderId(@Param("orderId") String orderId, @Param("userId") String userId);

    /**
     * 获取退款记录数量
     * @param orderId
     * @param userId
     * @return
     */
    int selectCount(@Param("orderId") String orderId, @Param("userId") String userId);
}
